<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>post()方法</title>
</head>

<body>
    <div id="app">
        <button @click="fnget">Post方法</button>
    </div>
</body>

</html>
<script src="https://cdn.bootcss.com/vue/2.6.11/vue.min.js"></script>
<script src="https://cdn.staticfile.org/axios/0.18.0/axios.min.js"></script>
<script>
    var app = new Vue({
        el: '#app',
        data: {
            user: {}
        },
        methods: {
            fnget() {
                axios.post("findById", {
                    id: 2,
                    name: 'xiaoxiao'
                }).then(function (res) {
                    console.log(res);
                }, function (err) {
                    console.log(err);
                })
            }
        }
    })
</script>